﻿package com.toncen.samepms.system.dao;

import java.util.HashMap;
import java.util.List;

import com.toncen.samepms.common.AbstractDao;
import com.toncen.samepms.system.domain.ModuleConfig;

/**
 * 描述：模块配置表表SYSTEM_MODULE_CONFIG的dao文件
 * 
 * @author tch
 */
public class ModuleConfigDao  extends AbstractDao<ModuleConfig> {

	public ModuleConfigDao() {
	}
	/**
	 * 获取一级根模块
	 * @param exclude
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("unchecked")
	public List<ModuleConfig> getAllRootModuleConfig() throws Exception {
		return findList("getAllRootModuleConfig", null);
	}
	/**
	 * create:xl
	 * create date:2012-6-4下午05:41:37
	 * 方法描述：
	 * 获取所有子模块操作权限
	 * 
	 */
	@SuppressWarnings("unchecked")
	public List<HashMap> getAllBlockRight() throws Exception {
		return (List) queryForList("getAllBlockRight", null);
	}
	
	/**
	 * create:xl
	 * create date:2012-6-4下午05:41:37
	 * 方法描述：
	 * 按父模块分组获取模块操作权限
	 */
	@SuppressWarnings("unchecked")
	public List<HashMap> getAllBlockRightCount() throws Exception {
		return (List) queryForList("getAllBlockRightCount", null);
	}
	
	/*
	 * (non-Javadoc)
	 * 
	 * @see com.comit.common.db.BaseDao#initialize()
	 */
	@Override
	protected void initialize() {
		setStatementPrefix("ModuleConfig");
		setStatementDivision(".");
	}
}
